package org.rency.mq.kafka.consumer.handler;

import org.rency.mq.kafka.consumer.handler.notify.AbstractNotifyHandler;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;

/**
 * ${todo}
 *
 * @author: Created by user_rcy@163.com on 2016/10/19.
 * @version: V1.0.0
 * @since JDK 1.8
 */
public class DefaultMessageHandler extends AbstractNotifyHandler<String, String> {

    protected static final Logger logger = LoggerFactory.getLogger(DefaultMessageHandler.class);

    @Override
    public void handler(String key, String data, String topic, int partition, long timestamp) {
        logger.info("{} >>>Kafka message listener:From Topic:{}, Key:{}, Data:{}.",this.getHandlerName(),topic,key,data);
    }

    @Override
    public String getHandlerName() {
        return "Kafka监听器1";
    }
}
